


word = "Python"
for char in word:
    print(f"当前字母: {char}")









fruits = ["苹果","香蕉","橙子"]
for fruit in fruits:
     print(f"我喜欢吃{fruit}")

print("range(5):", list(range(5)))

print("range(2,7):", list(range(2, 7)))

print("range(1,11,2):", list(range(1, 11, 2)))

print("range(5,0,-1):", list(range(5, 0, -1)))








total = 0
for num in range(1, 101):
    total += num
print(f"1~100的和: {total}")




for i in range(1,10):
    for j in range(1, i + 1 ):
        print(f"{j}*{i}={i * j}", end="\t")
    print()



    print("二维坐标:")
    for x in range(3):
        for y in range(3):
            print(f"{x},{y}",end="")
    print()











for a in range(10):
    for b in range(10):
        for c in range(10):
            password = f"{a}{b}{c}"
            if password == "123":
                print(f"破解成功!密码是:{password}")
                break
        else:
            continue
        break


size = 5

for i in range(size):
    print(" " *(size -i -1) + "*" *(2 * i +1))

for i in range(size-2, -1, -1):
    print(" "*(size - i - 1) + "*" *(2 * i + 1))